const imMessageType = {
  SYSTEM: 0,
  TEXT: 1,
  VOICE: 2,
  IMAGE: 3,
  VIDEO: 4,
  SYSTEM_RECOMMEND: 5,
  DIALOG: 6,
  VIDEO_SHARE: 7,
  XJS_MESSAGE: 8,
  FILE: 9,
  FILE_1: 10,
  PHONE_CALL: 11,
  INVITE_SIGNATURE: 12,
  AI_MESSAGE: 20,
  MESSAGE_LOADING: 13,
};

const workOrderType = {
  DEBUG: 1,
  PROBLEM: 3,
  TRIAL: 4,
  INSTALL: 5,
};

const materialType = {
  PREPARE_MATERIAL: 1,
  INSTALL_MATERIAL: 2,
};

const workOrderTypeName = {
  [workOrderType.DEBUG]: "设备调试",
  [workOrderType.PROBLEM]: "故障报修",
  [workOrderType.TRIAL]: "工件试加工",
  [workOrderType.INSTALL]: "安装调试",
};

const permMap = {
  INSTALL: {
    ENGINEER: "wechat:work-order:install:accept",
  },
  DEBUG: {
    ENGINEER: "",
  },
  TRIAL: {
    ENGINEER: "",
  },
  PROBLEM: {
    ENGINEER: "",
  },
};

const isResolveDict = [
  { text: "未解决", value: 1 },
  { text: "部分解决", value: 2 },
  { text: "部分解决", value: 3 },
  { text: "部分解决", value: 4 },
  { text: "完全解决", value: 5 },
];
const timelinessDict = [
  { text: "响应很慢", value: 1 },
  { text: "响应慢", value: 2 },
  { text: "一般", value: 3 },
  { text: "响应及时", value: 4 },
  { text: "非常及时", value: 5 },
];
const attitudeDict = [
  { text: "很差", value: 1 },
  { text: "不满意", value: 2 },
  { text: "一般", value: 3 },
  { text: "满意", value: 4 },
  { text: "非常满意", value: 5 },
];

const serviceType = [
  // { label: '其他', text: '其他', value: 0, color: '#4c7bfd', background: '#EBEFFF' },
  { label: '线下', text: '线下现场服务', value: 1, color: '#4c7bfd', background: '#EBEFFF' },
  { label: '线上', text: '线上远程服务', value: 2, color: '#4c7bfd', background: '#EBEFFF' }
]

const problemType = [
  { text: '故障维修', value: 1 },
  { text: '安装调试', value: 2 },
  { text: '检修保养', value: 3 },
  { text: '工件试磨', value: 4 }
]

const imgServerURL = "https://platform-icon.oss-cn-hangzhou.aliyuncs.com";
const img_serverURL = "https://zjmtic-oss.oss-cn-hangzhou.aliyuncs.com";
const upload_file_url = 'api/wx/oss/uploadFile'
export default {
  imMessageType,
  workOrderType,
  permMap,
  imgServerURL,
  img_serverURL,
  workOrderTypeName,
  materialType,
  isResolveDict,
  timelinessDict,
  attitudeDict,
  serviceType,
  problemType,
  upload_file_url
};
